package com.hccl.service.classifier;
import entities.SLUResult;
import gate.creole.ExecutionException;

import java.util.*;

public class RNNModel {
    //public void RNNModel(){};
    /*
    public ClassifierResult RNNModel() throws Exception {
        ClassifierResult result = new ClassifierResult();

        return result;

    }*/
    public ArrayList<SLUResult> Predict(String inputString)throws Exception {
        ClassifierResult result= new ClassifierResult();
        tfPredict pred = tfPredict.getInstance();
        try{ result=pred.predict(inputString);}catch (ExecutionException e) {
            e.printStackTrace();
        }
        ArrayList<SLUResult> results = new ArrayList<>();
        String target = result.getTarget();
        String action = result.getAction();
        String type = result.getType();
        double score = result.getScore();
        String rulename= "";
        String algorithmType= "neuralNetwork";
        results.add(new SLUResult(algorithmType,rulename,type,action, target,score, new HashMap<String, String>()));
        return results;

    }
    }

